requestchoice >NIL: title="File Choice" body="Please select the MIDI file in the next requester." OK
requestfile >env:infile drawer=midi/ title="Please choose a file"
;END
;START Script to choose the output file
c:requestchoice >NIL: title="File Choice" body="Please select the OUTPUT file. *n If it doesn't exist, enter the name manually.*n If no file is given it will be saved in the Timidity *n directory with the name output.wav" OK
c:requestfile >env:outfile title="Please choose a file"
c:RequestChoice >ENV:outres title="Bit resolution" body="Please select the sample resolution *n and the audio mode" "8bit MONO" "16bit MONO" "8bit STEREO" "16bit STEREO"
getenv outres >NIL:
IF $outres EQ 1
setenv outres -Ow8M
endif
IF $outres EQ 2
setenv outres -Ow1M
endif
IF $outres EQ 3
setenv outres -Ow8S
endif
IF $outres EQ 0
setenv outres -Ow1S
endif
;END
getenv outfile >NIL:
IF $outfile EQ ""
Run >NIL: TimidityPPC $outres -s $freq $infile
else
Run >NIL: TimidityPPC $outres -s $freq -o $outfile $infile
endif
delete env:freq >NIL:
delete env:outres >NIL:
delete env:infile >NIL:
delete env:outfile >NIL:
requestchoice >NIL: Done "Rendering, please wait a few seconds. *n Timidity script by Giorgio Signori *n Mail requests, comments and bug reports to yurex@tin.it" "Ok, see ya!"